package com.hmdp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;


@Data
@EqualsAndHashCode(callSuper = false)//是否生成equals和hashcode方法作用是用来比较两个对象是否相等
@Accessors(chain = true)//链式编程
@ApiModel(description = "博客实体")
@TableName("tb_blog")
public class Blog implements Serializable {
    private static final long serialVersionUID = 1L;


    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 商户id
     */
    @ApiModelProperty(value = "商户id")
    private Long shopId;

    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 用户图标
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "用户图标")
    private String icon;

    /**
     * 用户姓名
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "用户姓名")
    private String name;

    /**
     * 是否点赞过了
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "是否点赞过了")
    private Boolean isLike;

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题")
    private String title;

    /**
     * 探店的照片，最多9张，多张以","隔开
     */
    @ApiModelProperty(value = "探店的照片，最多9张，多张以\",\"隔开")
    private String images;

    /**
     * 探店的文字描述
     */
    @ApiModelProperty(value = "探店的文字描述")
    private String content;

    /**
     * 点赞数量
     */
    @ApiModelProperty(value = "点赞数量")
    private Integer liked;

    /**
     * 评论数量
     */
    @ApiModelProperty(value = "评论数量")
    private Integer comments;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

}
